<?php

namespace app\api\controller\admin;

use app\common\controller\Api;
use app\api\service\admin\ChannelService;

class Channel extends Api
{
    protected $noNeedLogin = [];
    protected $noNeedRight = [];
    

    

    /**
     * 列表
     */
    public function index()
    {
        $data = $this->request->post();
        $res = ChannelService::index($data);
        return json($res);
    }

    /**
     * 添加
     */
    public function add()
    {
        $data = $this->request->post();
        $res = ChannelService::add($data);
        return json($res);
    }

    /**
     * 修
     */
    public function edit()
    {
        $data = $this->request->post();
        $res = ChannelService::edit($data);
        return json($res);
    }

    /**
     * 删除
     */
    public function del()
    {
        $data = $this->request->post();
        $res = ChannelService::del($data);
        return json($res);
    }

    /**
     * 查询
     */
    public function select()
    {
        $data = $this->request->post();
        $res = ChannelService::select($data);
        return json($res);
    }

    /**
     * 查询
     */
    public function get_name()
    {
        $data = $this->request->post();
        $res = ChannelService::get_name($data);
        return json($res);
    }

    /**
     * 视图
     */
    public function view()
    {
        $data = $this->request->post();
        $res = ChannelService::view($data);
        return json($res);
    }
    
}